package org.wabson.alfresco.translations;

import java.util.Comparator;

import com.google.appengine.api.blobstore.BlobInfo;

public class BlobInfoDateComparator implements Comparator<BlobInfo>
{

    public BlobInfoDateComparator()
    {
    }

    @Override
    public int compare(BlobInfo i1, BlobInfo i2)
    {
        if (i1.getCreation().before(i2.getCreation()))
        {
            return 1;
        }
        else if (i1.getCreation().after(i2.getCreation()))
        {
            return -1;
        }
        else
        {
            return 0;
        }
    }

}
